package org.taurusxi.eventbus;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Component;

/**
 * Created by chengxi on 2017/8/27.
 */
@Component
@EnableBinding(Sink.class)
public class Receiver {

    @StreamListener(Sink.INPUT)
    public void receive(Object payload){
        System.out.println("Received:"+payload);
    }

}
